package com.yanqu.road.server.game.service;

import com.google.protobuf.InvalidProtocolBufferException;
import com.yanqu.road.pb.syncMessage.SyncMessage;
import com.yanqu.road.pb.winery.WineryProto;
import com.yanqu.road.server.manger.player.UserMgr;
import com.yanqu.road.sync.message.SyncResponse;

public class CrossActivityRankServiceCmd implements IGameServiceCommand {
    @Override
    public SyncResponse execute(SyncMessage.Request request) throws InvalidProtocolBufferException {
        SyncResponse syncResponse = new SyncResponse();
        WineryProto.WineryVisitReqMsg wineryVisitReqMsg = WineryProto.WineryVisitReqMsg.parseFrom(request.getDataBytes());
        WineryProto.WineryVisitRespMsg.Builder builder = UserMgr.wineryVisit(wineryVisitReqMsg.getVisitId());
        syncResponse.setResponseBuilder(builder);
        return syncResponse;
    }
}
